export const getValueFn = (value, queryData) => {
  let typeList = {
    spuNoList: ['spuNo', 'spuNo_s'],
    productNameList: ['productName', 'productName_s', 'productNameFinal'],
    productCateGoryList: ['categoryPath', 'categoryPath_s', 'categoryUuid'],
    skuNoList: ['skuNo', 'skuNo_s'],
    supplyNameList: ['supplyName', 'supplyName_s'],
    supplyUuidList: ['supplyUuid']
  }
  let { spuNoList, productNameList, productCateGoryList, skuNoList, supplyNameList, supplyUuidList } = typeList
  let { spuNo, productName, categoryName, categoryUuid, skuNo, supplyName, supplyUuid } = queryData
  let result = ''
  switch (true) {
    case _.includes(spuNoList, value.name):
      result = spuNo
      break
    case _.includes(productNameList, value.name):
      result = productName
      break
    case _.includes(productCateGoryList, value.name):
      result = categoryUuid || categoryName
      break
    case _.includes(skuNoList, value.name):
      result = skuNo
      break
    case _.includes(supplyNameList, value.name):
      result = supplyName
      break
    case _.includes(supplyUuidList, value.name):
      result = supplyUuid
      break
    default:
      result = value.value
      break
  }
  return result
}
